package ar.uba.fi.tonyvaliente.files;

public class RecordPosition {

	private int blockNumber;
	private int offset;
	
	public RecordPosition(int blockNumber, int offset) {
		this.blockNumber = blockNumber;
		this.offset = offset;
	}
	
	public int getBlockNumber() {
		return blockNumber;
	}
	
	public int getOffset() {
		return offset;
	}

	@Override
	public String toString() {
		return "blockNumber: " + blockNumber + " offset: " + offset;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + blockNumber;
		result = prime * result + offset;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof RecordPosition))
			return false;
		final RecordPosition other = (RecordPosition) obj;
		if (blockNumber != other.blockNumber)
			return false;
		if (offset != other.offset)
			return false;
		return true;
	}
	
	
	
}
